names; $catg = $data->cat; $getp = $DBcon->prepare("select * from stock_prices where (item_name ='$itemname' and item_category = '$catg')") ; $getp->execute() ; $row = $getp->fetch(pdo::FETCH_ASSOC) ; $price = $row['prices'] ; echo $price ; ?>